package cn.tedu.charging.common.entity;

import lombok.Data;
import lombok.experimental.FieldDefaults;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

import java.math.BigDecimal;


@Data
@FieldDefaults(level = lombok.AccessLevel.PRIVATE)
@Document(indexName="charging-progress")
@Setting(shards = 1,replicas = 0)
public class ChargingProgressEntity {
    //主键 docId Long id
    @Id
    @Field(type = FieldType.Long)
    Long id;
    @Field(type = FieldType.Keyword)
    String billId;
    @Field(type = FieldType.Integer)
    Integer userId;
    @Field(type = FieldType.Integer)
    Integer stationId;
    @Field(type = FieldType.Integer)
    Integer gunId;

    //叠加充电电量
    @Field(type = FieldType.Float)
    Float chargingCapacity;

    //总金额 叠加
    @Field(type = FieldType.Double)
    BigDecimal totalCost;
    //温度记录
    @Field(type = FieldType.Float)
    Float temperture;
    //是否充满
    @Field(type = FieldType.Boolean)
    Boolean isFull;
}
